<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
<s:include value="/include/header/header.jsp"></s:include>
	Rate Mapping Configuration
<s:include value="/include/header/mainNav.jsp"></s:include>
	<!--NAV ENDS HERE-->
    <!--DISPLAY STARTS HERE-->
    <div id="display">
    <!--DISPLAY INNER STARTS HERE-->
	<div id="display-inner">
		<h1>Rate Mapping Configuration</h1>
		<table>
			<tr>
				<td class="table-width">Option</td>
				<td class="table-width">ID</td>
				<td class="table-width">Account</td>
				<td class="table-width">Parent Account</td>
				<td class="table-width">Offering</td>
				<td class="table-width">Base Rate</td>
				<td class="table-width">Limits</td>
				<td class="table-width">Step 1 units</td>
				<td class="table-width">Step 1 rate</td>
				<td class="table-width">Step 2 units</td>
				<td class="table-width">Step 2 rate</td>
				
			</tr>
			<s:iterator value="services" var="rm">
				<tr>
					<td class="table-width"><a href="rateMapping.action?serviceId=<s:property value='#rm.id'/>">Edit</a></td>
					<td class="table-width"><s:property value="#rm.id" /></td>
					<td class="table-width"><s:property value="#rm.account.company" /></td>
					<td class="table-width"><s:property value="#rm.account.parent.company" /></td>
					<td class="table-width"><s:property value="#rm.offering.description" /></td>
					<td class="table-width"><s:property value="getText('format.money', {#rm.baseRate} )" /></td>
					<td class="table-width"><s:property value="#rm.limit" /></td>
					<td class="table-width"><s:property value="#rm.step1Unit" /></td>
					<td class="table-width"><s:property value="getText('format.money', {#rm.step1Rate} )" /></td>
					<td class="table-width"><s:property value="#rm.step2Unit" /></td>
					<td class="table-width"><s:property value="getText('format.money', {#rm.step2Rate} )" /></td>
					
				</tr>
			</s:iterator>

		</table>

		<form action="rateMapping" >
			<p class="paragraph-form">
				<s:textfield name="service.baseRate" label="BaseRate" cssClass ="input-field" />
			</p>
			<p class="paragraph-form">
				<s:textfield name="service.step1Unit" label="Step1Units" cssClass ="input-field" />
			</p>
			<p class="paragraph-form">
				<s:textfield name="service.step1Rate" label="Step1Rate" cssClass ="input-field" />
			</p>
			<p class="paragraph-form">
				<s:textfield name="service.step2Unit" label="Step2Units" cssClass ="input-field" />
			</p>
			<p class="paragraph-form">
				<s:textfield name="service.step2Rate" label="Step2Rate" cssClass ="input-field" />
			</p>
			<p class="paragraph-form">
				<s:select label="Offering"
					name="offering"
					value="service.offering.id"
					list="offerings"
					cssClass="dropdown" 
	 				listKey="id"
	 				listValue="description"/>
   			</p>
			<p>
				<s:hidden name="service.id" />
				<s:submit value="Create" id="submit-button-2" />
			</p>
			
		</form>

		<s:include value="/include/footer/footer.jsp"></s:include>		
